home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
TEX-UTIL
/
DVIPS_55
/
dospk
/
gendospk
next >
Wrap
Text File
|
1994-03-29
|
4KB
|
78 lines
| This is a sample batch file to run metafont, convert the GF file to
| the PK format and store the PK font in the appropriate directory. It
| is meant to be called by dviwin and that's the reason for the absence
| of any parameter checking. It also assumes that metafont and gftopk
| are operating properly. This sample file attempts to cover as many
| devices as possible; you will probably get better and faster results
| if you write a smaller and more specialized batch file.
|
| The plain base is a prerequisite: make sure that you generate it by
| running inimf on plain.mf, then input the file modes.mf and finally
| dump the format file. If you don't know what I am talking about,
| please read the documentation that comes with the metafont program,
| as well as the Metafont book. You MAY need to modify this batch file
| if the name of your metafont program is not mf.
|
| You WILL need to modify the routine to place the PK files in the
| proper directory; the current method uses the environment variable
| DVIFONTS which is assumed to contain the base directory for the PK
| fonts. Any square-pixel fonts are assumed to be stored in the
| directories $(DVIFONTS)\X where X is the resolution of the font.
| Non-square-pixel fonts are assumed to stored in the directories
| $(DVIFONTS)\XxY where X is the horizontal resolution and Y is the
| vertical resolution.
|
| It is trivial to modify the name of metafont and the base directory;
| just select the proper values for the first two statements after
| these comments. If you use another directory structure, you need
| to modify the next two statements.
|
| You may also need to do more modifications if you have other devices;
| this batch file generates fonts for the screen, 300dpi laser and
| inkjet printers, 600dpi laserjets, as well as 9-pin and 24-pin dot
| matrix printers. If you want to use another device, you will have to
| understand the code below and modify it accordingly (maybe you will
| want to rewrite the code in a compiled language to improve the speed,
| the error handling and avoid all the ugly gotos). If you want to use
| a 9-pin dot matrix printer at 120x144dpi or 240x144dpi, add the
| following lines to the file modes.mf and regenerate the plain base.
|
| mode_def epsmed = % Epson-FX at 240x144dpi
| mode_param (pixels_per_inch, 240);
| mode_param (aspect_ratio, 144 / pixels_per_inch);
| EpsonMXFX_;
| enddef;
|
| mode_def epswlo = % Epson-FX at 120x144dpi
| mode_param (pixels_per_inch, 120);
| mode_param (aspect_ratio, 144 / pixels_per_inch);
| EpsonMXFX_;
| enddef;
|
| If metafont does not recognize any other modes, it will generate
| its standard proofing fonts which are HUGE and inappropriate for
| your device. In that case, get the file modes.mf from CTAN and
| generate the plain base again using the command:
| inimf plain;input modes;dump
| Then you need to copy plain.bas to the appropriate directory. You
| may need to replace "inimf" by "mf -i" for some Metafont versions.
|
| Here are the parameters passed by dviwin:
| %1: fontname (truncated to 8 chars)
| %2: magstep
| %3: xres (hor. resolution of font)
| %4: yres (vert. resolution of font)
| %5: xbase (base hor. resolution)
| %6: ybase (base vert. resolution)
| %7: drive (of current dvi file)
| %8: path (of current dvi file)
| %9: gf extension (truncated to 3 chars)
|
| In most cases, you will only need to modify the next four statements:
dir <rubbish$dir>
|set PK_BASE <TexRoot>.f5.%0
|set PK_DIR <PK_BASE>.%2pk
set NAME %0
if %4=%5 then obey <dos$genpk>.square %0 %1 %2 %2 %4 %5 %6 %7 %8 else obey <dos$genpk>.nsquare %0 %1 %2 %2 %4 %5 %6 %7 %8